home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 248_01 / ddef.h < prev    next >
Text File  |  1989-08-16  |  4KB  |  115 lines

  1. /*    DDEF:    Global definitions for MicroSPELL 1.0
  2.         Spell Checker and Corrector
  3.  
  4.         (C)opyright May 1987 by Daniel Lawrence
  5.         All Rights Reserved
  6. */
  7.  
  8. /* some global fuction declarations */
  9.  
  10. char *malloc();
  11. char *strcpy();
  12. char *strcat();
  13. char *strncpy();
  14. char *itoa();
  15. FILE *popen();
  16. WORD *getword();
  17. char *flook();
  18. char *nxtmword();
  19. char *fgets();
  20.  
  21. #ifdef    CMPRS
  22. char *gcword();
  23. #endif
  24.  
  25. #ifdef    maindef
  26.  
  27. /* for MAIN.C */
  28.  
  29. int numwords = 0;            /* current # of source words loaded */
  30. int totwords = 0;            /* total number of words processed */
  31. int prowords = 0;            /* total processed words */
  32. int badwords = 0;            /* number of mismatched words */
  33. WORD *sword[MAXWORDS+1];        /* current source word list */
  34.  
  35. int outnum = -1;            /* current output source file # */
  36. FILE *outfile = NULL;            /* mispelled word temp file */
  37.  
  38. int sfnum = -1;                /* current source file ordinal # */
  39. FILE *srcfile = NULL;            /* current source file pointer */
  40. int srcline = 0;            /* current source line number */
  41. char iline[MAXLINE];            /* current input line */
  42. char *iptr;                /* current ptr into line */
  43.  
  44. #if    CMPRS
  45. char *mdfile = "dict.dct";        /* main dictionary text file */
  46. #else
  47. char *mdfile = "dict.txt";        /* main dictionary text file */
  48. #endif
  49. FILE *mdptr = NULL;            /* ptr to main dictionary */
  50.  
  51. char *comlist = "common.txt";        /* most common word list file */
  52. char userlist[NFILEN] = "";        /* First user word lsit file */
  53. int commonf = FALSE;            /* common dictionary loaded flag */
  54. int numcom = 0;                /* # of common words */
  55. int numfiltr = 0;            /* number of filter words */
  56. char *cword[MAXCOM+1];            /* list of common words */
  57.  
  58. int numspell = 0;            /* number of files to spell */
  59. char splname[MAXSPELL][NFILEN];        /* name of files to spell */
  60.  
  61. int (*comp)() = NULL;            /* current comparison function */
  62. char hivalue[] = { 0xff, 0};        /* HIGH value string */
  63.  
  64. int swdebug = FALSE;            /* debugging flag */
  65. int swemacs = FALSE;            /* use MicroEMACS to correct */
  66. int swwords = FALSE;            /* output a word list */
  67.  
  68. #if    RAMSIZE
  69. long envram = 0;            /* # of bytes malloced */
  70. #endif
  71. #else
  72.  
  73. /* for all the other .C files */
  74.  
  75. extern int numwords;            /* current # of source words loaded */
  76. extern int totwords;            /* total number of words processed */
  77. extern int prowords;            /* total processed words */
  78. extern int badwords;            /* number of mismatched words */
  79. extern WORD *sword[MAXWORDS];        /* current source word list */
  80.  
  81. extern int outnum;            /* current output source file # */
  82. extern FILE *outfile;            /* mispelled word temp file */
  83.  
  84. extern int sfnum;            /* current source file ordinal # */
  85. extern FILE *srcfile;            /* current source file pointer */
  86. extern int srcline;            /* current source line number */
  87. extern char iline[NSTRING];        /* current input line */
  88. extern char *iptr;            /* current ptr into line */
  89.  
  90. extern char *mdfile;            /* main dictionary text file */
  91. extern FILE *mdptr;            /* ptr to main dictionary */
  92.  
  93. extern char *comlist;            /* most common word list file */
  94. extern char userlist[];            /* First user word lsit file */
  95. extern int commonf;            /* common dictionary loaded flag */
  96. extern int numcom;            /* # of common words */
  97. extern int numfiltr;            /* number of filter words */
  98. extern char *cword[];            /* list of common words */
  99.  
  100. extern int numspell;            /* number of files to spell */
  101. extern char splname[MAXSPELL][NFILEN];    /* name of files to spell */
  102.  
  103. extern int (*comp)();            /* current comparison function */
  104. extern char hivalue[];            /* HIGH value string */
  105.  
  106. extern int swdebug;            /* debugging flag */
  107. extern int swemacs;            /* use MicroEMACS to correct */
  108. extern int swwords;            /* output a word list */
  109.  
  110. #if    RAMSIZE
  111. extern long envram;            /* # of bytes malloced */
  112. #endif
  113. #endif
  114.  
  115.